package org.dyndns.opendemogroup.optimizer.operations;

import org.junit.Test;

/**
 * A class to test the class ReciprocalExchangeMutator
 */
public class ReciprocalExchangeMutatorTest extends
		OrderPreservingOperationBaseTest
{
	public ReciprocalExchangeMutatorTest ( )
	{
		super ( new ReciprocalExchangeMutator ( ) );
	}

	/**
	 * Tests the <i>perform</i> method with the example in the assignment.
	 */
	@Test
	public void perform_AssignmentExample ( )
	{
		int a = 4;
		int b = 13;
		checkPerform ( new double[]
		{
			0, 8, 13, 2, 3, 5, 9, 14, 10, 6, 15, 16, 11, 1, 7, 17, 18, 19, 12,
			4
		}, new double[]
		{
			10, 12, 2, 13, 15, 8, 9, 17, 19, 18, 4, 5, 1, 0, 11, 3, 7, 16, 14,
			6
		}, a, b, new double[]
		{
			0, 8, 13, 2, 1, 5, 9, 14, 10, 6, 15, 16, 11, 3, 7, 17, 18, 19, 12,
			4
		} );
	}

}
